home *** CD-ROM | disk | FTP | other *** search
/ PC Advisor 2011 May / PC Advisor 190 E.iso / pc / ESSENTIALS / VLC Media Player 1.1 / vlc-1.1.5-win32.exe / sdk / include / vlc / plugins / vlc_epg.h < prev    next >
Encoding:
C/C++ Source or Header  |  2010-11-13  |  2.9 KB  |  97 lines

  1. /*****************************************************************************
  2.  * vlc_epg.h: Electronic Program Guide
  3.  *****************************************************************************
  4.  * Copyright (C) 2007 the VideoLAN team
  5.  * $Id: ded3f7f09ffda3c734db3ee33b03af974a9b955c $
  6.  *
  7.  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  *
  14.  * This program is distributed in the hope that it will be useful,
  15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  * GNU General Public License for more details.
  18.  *
  19.  * You should have received a copy of the GNU General Public License
  20.  * along with this program; if not, write to the Free Software
  21.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  22.  *****************************************************************************/
  23.  
  24. #ifndef VLC_EPG_H
  25. #define VLC_EPG_H 1
  26.  
  27. /**
  28.  * \file
  29.  * This file defines functions and structures for storing dvb epg information
  30.  */
  31.  
  32. typedef struct
  33. {
  34.     int64_t i_start;    /* Interpreted as a value return by time() */
  35.     int     i_duration;    /* Duration of the event in second */
  36.  
  37.     char    *psz_name;
  38.     char    *psz_short_description;
  39.     char    *psz_description;
  40.  
  41. } vlc_epg_event_t;
  42.  
  43. typedef struct
  44. {
  45.     char            *psz_name;
  46.     vlc_epg_event_t *p_current; /* Can be null or should be the same than one of pp_event entry */
  47.  
  48.     int             i_event;
  49.     vlc_epg_event_t **pp_event;
  50. } vlc_epg_t;
  51.  
  52. /**
  53.  * It initializes a vlc_epg_t.
  54.  *
  55.  * You must call vlc_epg_Clean to release the associated resource.
  56.  */
  57. VLC_EXPORT(void, vlc_epg_Init, (vlc_epg_t *p_epg, const char *psz_name));
  58.  
  59. /**
  60.  * It releases all resources associated to a vlc_epg_t
  61.  */
  62. VLC_EXPORT(void, vlc_epg_Clean, (vlc_epg_t *p_epg));
  63.  
  64. /**
  65.  * It creates and appends a new vlc_epg_event_t to a vlc_epg_t.
  66.  *
  67.  * \see vlc_epg_t for the definitions of the parameters.
  68.  */
  69. VLC_EXPORT(void, vlc_epg_AddEvent, (vlc_epg_t *p_epg, int64_t i_start, int i_duration, const char *psz_name, const char *psz_short_description, const char *psz_description));
  70.  
  71. /**
  72.  * It creates a new vlc_epg_t*
  73.  *
  74.  * You must call vlc_epg_Delete to release the associated resource.
  75.  */
  76. VLC_EXPORT(vlc_epg_t *, vlc_epg_New, (const char *psz_name));
  77.  
  78. /**
  79.  * It releases a vlc_epg_t*.
  80.  */
  81. VLC_EXPORT(void, vlc_epg_Delete, (vlc_epg_t *p_epg));
  82.  
  83. /**
  84.  * It set the current event of a vlc_epg_t given a start time
  85.  */
  86. VLC_EXPORT(void, vlc_epg_SetCurrent, (vlc_epg_t *p_epg, int64_t i_start));
  87.  
  88. /**
  89.  * It merges all the event of \p p_src and \p p_dst into \p p_dst.
  90.  *
  91.  * \p p_src is not modified.
  92.  */
  93. VLC_EXPORT(void, vlc_epg_Merge, (vlc_epg_t *p_dst, const vlc_epg_t *p_src));
  94.  
  95. #endif
  96.  
  97.